package com.xiaoshuidi.cloud.module.contract.controller.app.contract.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Description:
 * @author: zhaoyu
 * @date: 2023/4/25
 */
@Data
public class AuthApplyReqVO {

    /** 用户姓名 */
	@Schema(description = "用户姓名", required = true, example = "合房")
    @NotBlank(message = "用户姓名不能为空")
    private String name;

    /** 用户身份证号 */
	@Schema(description = "用户身份证号", required = true, example = "123123123123")
    @NotBlank(message = "用户身份证号不能为空")
    @Size(max = 18, min = 18, message = "身份证号长度不正确")
    @Pattern(regexp = "^[1-9][0-9]{5}(18|19|20)[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}([0-9]|(X|x))", message = "身份证号不正确")
    private String card;

    /** 房东ID(请求Python的Authorization值) */
	@Schema(description = "房东ID(请求Python的Authorization值)", required = true, example = "12345")
    @NotBlank(message = "房东ID不能为空")
    private String ownerUserId;

    /** 租客手机号 */
	@Schema(description = "租客手机号", required = true, example = "18012345678")
    @NotBlank(message = "租客手机号不能为空")
    private String phone;

}
